package cn.codeforfun.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Package cn.codeforfun.controller
 * Project framework-demo
 * Author WangBin
 * Email bin.wang12@pactera.com
 * Created on 2017/5/3 15:44
 * version 1.0.0
 */
@Controller
public class TestController {
  @RequestMapping("/")
  public String index() {
    return "index";
  }

  @RequestMapping("/hello")
  public String hello() {
    return "hello";
  }

  @RequestMapping("/home")
  public String home() {
    return "home";
  }

  @RequestMapping(value = "/login", method = RequestMethod.GET)
  public String login(Model model) {
    model.addAttribute("666", "ddd");
    return "login";
  }
}
